import os, sys
from PyQt5.QtWidgets import *
from PyQt5.QtGui import *
from PyQt5.QtCore import *
from lib.mainwindow import LBox

import lib.pconf as pconf

# get app's path
p_cur = os.path.dirname(os.path.abspath(__file__))
pconf.sys_cfg["system_rootpath"] = p_cur

# create Qt App & mainwindow
app = QApplication(sys.argv)
form = LBox(path=sys.argv[1] if len(sys.argv) >= 2 else None, pathSave=sys.argv[2] if len(sys.argv) >= 3 else None)
form.show()
sys.exit(app.exec_())